﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListView.aspx.cs" Inherits="demo.Pages.ListView" %>

<%@ Register Assembly="Water" Namespace="Water.Web.Controls" TagPrefix="page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <page:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="demo.Objects.BLL.Employees" CanSelect="true" EnablePaging="true"
            QueryControlID="Container2">
        </page:ObjectDataSource>
        <page:Container ID="Container2" runat="server" ViewMode="Query" DefaultMode="Query" Columns="2" TitleText="查询条件" DisplayBorder="false"
            DisplayContain="true">
            <QueryTemplate>
                <page:Autocomplete ID="Autocomplete1" runat="server" Prompt="EMPLOYEES.ID" QueryField="ID" QueryProperty="Value" QueryOperator="Equals"
                    TypeName="demo.Objects.BLL.Employees" ReturnTextField="FIRSTNAME" ReturnValueField="ID" MatchField="FIRSTNAME" Max="10" />
                <page:Autocomplete ID="Autocomplete2" runat="server" Prompt="EMPLOYEES.FIRSTNAME" QueryField="FIRSTNAME" QueryProperty="Value"
                    QueryOperator="Equals" TypeName="demo.Objects.BLL.Employees" ReturnTextField="FIRSTNAME" ReturnValueField="FIRSTNAME"
                    MatchField="FIRSTNAME" Max="10" />
                <page:TextBox ID="TextBox3" runat="server" Prompt="EMPLOYEES.lastname" QueryField="lastname" QueryProperty="text"></page:TextBox>
                <page:TextBox ID="TextBox4" runat="server" Prompt="EMPLOYEES.email" QueryField="email" QueryProperty="text" QueryOperator="Like"></page:TextBox>
                <page:Layout ID="Layout1" runat="server" Prompt="EMPLOYEES.salary">
                    <page:Label ID="Label1" runat="server">&gt;=</page:Label>
                    <page:TextBox ID="TextBox5" runat="server" Prompt="EMPLOYEES.salary" QueryField="salary" QueryProperty="text" QueryOperator="GreaterOrEquals"></page:TextBox>
                </page:Layout>
                <page:Datepicker ID="Datepicker1" runat="server" Prompt="EMPLOYEES.hiredate" QueryField="hiredate" QueryProperty="text" YearRange="-30:+5"></page:Datepicker>
            </QueryTemplate>
            <ItemTemplate>
                <page:TextBox ID="TextBox6" runat="server" Prompt="EMPLOYEES.salary" QueryField="salary" QueryProperty="text" QueryOperator="GreaterOrEquals"></page:TextBox>
            </ItemTemplate>
            <InsertTemplate>
                <span>insert</span>
            </InsertTemplate>
            <FooterTemplate>
                <page:SuperButton ID="SuperButton7" runat="server" ButtonDefaultMode="Button" CommandName="Select" Prompt="sys.select" QueryTarget="ListView1" />
            </FooterTemplate>
        </page:Container>
        <br />
        <page:Container ID="container1" runat="server" Promptable="false" DisplayBorder="true" TitleText="员工基本信息" PackageType="Div">
            <ItemTemplate>
                <page:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" IsCallBack="true" ShowFooter="true" GridHeight="450px"
                    AutoQuery="false" QueryTarget="ListView1">
                    <Columns>
                        <page:BoundField DataField="id" HeaderStyle-Width="50" HeaderPrompt="employees.id" SortExpression="id" FooterPrompt="Σ：" />
                        <page:BoundField DataField="firstname" HeaderStyle-Width="80" HeaderPrompt="employees.firstname" SortExpression="firstname" />
                        <page:BoundField DataField="lastname" HeaderStyle-Width="80" HeaderPrompt="employees.lastname" SortExpression="lastname" />
                        <page:BoundField DataField="email" HeaderStyle-Width="150" HeaderPrompt="employees.email" />
                        <page:BoundField DataField="hiredate" DataFormatString="{0:yyyy-MM-dd}" ItemStyle-ForeColor="#0000ff" HeaderStyle-Width="80"
                            SortExpression="hiredate" HeaderPrompt="employees.hiredate" />
                        <page:BoundField DataField="salary" HeaderStyle-Width="80" SortExpression="salary" HeaderPrompt="employees.salary" SummaryFunction="Sum"
                            NullDisplayText="0" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                        <page:BoundField DataField="title_name" HeaderStyle-Width="150" HeaderPrompt="jobs.title" />
                        <page:BoundField DataField="minsalary" HeaderStyle-Width="80" SortExpression="minsalary" HeaderPrompt="jobs.minsalary" SummaryFunction="Sum"
                            NullDisplayText="0" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                        </page:BoundField>
                        <page:BoundField DataField="maxsalary" HeaderStyle-Width="80" SortExpression="maxsalary" HeaderPrompt="jobs.maxsalary" SummaryFunction="Sum"
                            NullDisplayText="0" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                        </page:BoundField>
                        <page:BoundField DataField="departmentName" HeaderStyle-Width="100" HeaderPrompt="departments.departmentname" />
                        <asp:TemplateField HeaderStyle-Width="150">
                            <ItemTemplate>
                                <a href="http://www.google.com" target="_blank">google </a>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <a href="http://www.google.com" target="_blank">google </a>
                            </HeaderTemplate>
                            <FooterTemplate>
                                <a href="http://www.google.com" target="_blank">google </a>
                            </FooterTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerTemplate>
                        <page:DataPager ID="DataPager1" runat="server" PageSize="20" PagedControlID="ListView1" AutoUpdatedAfterCallBack="true" QueryTarget="ListView1" />
                    </PagerTemplate>
                </page:ListView>
            </ItemTemplate>
        </page:Container>
    </div>
    </form>

    <script>
        $Page.AjaxDebug = true;
    </script>

</body>
</html>
